<?php

switch ($_POST[closed])
{
case ("Closed");
$_POST[closed]='checked';
	break;
case ("Open");
$_POST[closed]='';
	break;
case ("");
$_POST[closed]='';
	break;
}

#if($_POST[closed]=='Closed')
#{
#$result = mysql_query("SELECT * FROM tblJobs WHERE Closed = 'checked' AND LogNumber LIKE '$_POST[lognumber]' AND #Operator LIKE '$_POST[operator]' AND Requestor LIKE '$_POST[requestor]' AND Subject LIKE '$_POST[subject]' AND #Proirty LIKE '$_POST[proirty]' Assigned LIKE '$_POST[assigned]' AND Line LIKE '$_POST[line]'");
#}
#else
#{

$result = mysql_query("SELECT * FROM tblJobs where Closed!='checked' AND Status='1st Line - In Progress' ");



echo '<FORM action="index.php?m=h&p=hfilter" method="POST">';
echo '<TABLE width="300px" cellpadding=0 border="1"  style="border: 1px solid #000000;">';
echo '<tr style="border: 1px solid #000000;"><td>Log Number</td><td>Assigned <br>to</td><td>Requestor</td><td>Subject</td></tr>';

while($row = mysql_fetch_array($result))
  {
   if($row[Closed]=='checked')
{
$row[Closed]='Closed';
}
else
{
$row[Closed]='Open';
}
  echo '<tr><td>'.$row['LogNumber']. '</td><td>'.$row[Assigned].'</td><td>'.$row['Requestor'].'</td><td>';
  if($row['Private']=='checked')
  {
   $row['Subject']='Private';
  }
  echo $row['Subject'].'</td>'.'</tr>';
  }
echo '</TABLE> </FORM>';


?>